#ifndef DATABASE_H
#define DATABASE_H
//framework
#include <QObject>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlError>
#include <QSqlRecord>
#include <QStringList>

//current

//temp
#include <QDebug>

class DataBase : public QObject
{
    Q_OBJECT
public:
    explicit DataBase(QObject *parent = 0);
    ~DataBase();
    void insertDump2Base(const QList<QString>& _s );
    QList<QMap<QString,QString>> _proposalInCollection(const QList<QString>*);

    static DataBase * getInstance()
    {
        if(!p_instance)
            p_instance = new DataBase();
        return p_instance;
    }
private:
    static DataBase* p_instance;
    QSqlDatabase dbase;
    QList<QStringList> proposalResult;
signals:
    void myError( const QString & );
    void baseReady();    
public slots:

};

#endif // DATABASE_H
